<template>
  <div>
    <div class="box">
      <span>新型冠状肺炎实时监测</span>
    </div>
    <span class="min">当前时间:{{ time | time }}</span>
  </div>
</template>

<script>
export default {
  name: "MyVueHome",

  data() {
    return {
      time: new Date(),
    };
  },
  computed: {},
  mounted() {
    this.lin();
  },

  methods: {
    lin() {
      setInterval((val) => {
        this.time = new Date();
      }, 1000);
    },
  },
};
</script>

<style lang="scss" scoped>
.box {
  width: 100rem;
  height: 3.125rem;
  background-image: url("../assets/head_bg.eeff3da5.png");
  background-size: 100% 100%;
  color: white;
  text-align: center;
  line-height: 3.125rem;
  font-weight: 900;
  font-size: 1.875rem;
}
.min {
  font-size: 0.75rem;
  color: grey;
  position: absolute;
  right: 0.625rem;
  top: 0.625rem;
}
</style>
